Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: allow user to specify datetime and UUID objects in post content #61

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

odesenfans
Copy link
Contributor

Problem: using create_post() with an object containing datetime, UUIDs and other types not serializable by the Python json module fails.

Solution: as we already use Pydantic all over the place, use the Pydantic encoder as default for all the types not serializable by the json module.

Problem: using `create_post()` with an object containing datetime, UUIDs
and other types not serializable by the Python `json` module fails.

Solution: as we already use Pydantic all over the place, use the
Pydantic encoder as default for all the types not serializable by the
`json` module.
@hoh
Copy link
Member

hoh commented Sep 22, 2023

Looks like a decent idea 👍

@hoh hoh merged commit fea8757 into main Sep 22, 2023
10 checks passed
@hoh hoh deleted the od-specify-json-encoder branch September 22, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants